import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Login',
      component: ()=> import('/src/views/Login.vue'),//登陆页面
    },
    {
      path: '/Register',
      name: 'Register',
      component: ()=> import('/src/views/LayOut/Register.vue'),//登陆页面
    },
    {
      path: '/index',
      name: 'Index',
      component: ()=> import('/src/views/Index.vue'),
      children:[
        {
          path: '/BookList',
          name: 'BookList',
          component: ()=> import('/src/views/LayOut/BookList.vue'),
        },
        {
          path: '/FindBook',
          name: 'FindBook',
          component: ()=> import('/src/views/LayOut/FindBook.vue'),
        },
        {
          path: '/Recommon',
          name: 'Recommon',
          component: ()=> import('/src/views/LayOut/Recommon.vue'),
        },
        {
          path: '/Img',
          name: 'Img',
          component: ()=> import('/src/views/LayOut/indexImg.vue'),
        }
      ]
    }

  ]
})

export default router
